export const backendMenusToRouters = (menus) => {
    let routers = []
    forEach(menus, (menu) => {
      // 将后端数据转换成路由数据
      let route = backendMenuToRoute(menu)
      // 如果后端数据有下级，则递归处理下级
      if (menu.children && menu.children.length !== 0) {
        route.children = backendMenusToRouters(menu.children)
      }
      routers.push(route)
    })
    return routers
  }